<script setup lang="ts">
import ShowDrawC from './components/ShowDraw.vue'
import YkAdaptiveBox from '@yk/components/adaptive-box/YkAdaptiveBox.vue'

const selfId = shallowRef('')
const route = useRoute()

const adaptiveBoxRef = shallowRef()

onMounted(() => {
  if (route.query.id) {
    selfId.value = route.query.id.toString()
  } else {
    ElMessage.warning('参数异常')
  }
})
function loadHandle () {
  adaptiveBoxRef.value.resize()
}

</script>

<template>
  <yk-adaptive-box ref="adaptiveBoxRef" mode="contain">
    <show-draw-c v-if="selfId" :self-id="selfId" @load="loadHandle" />
  </yk-adaptive-box>
</template>

<style scoped lang="scss">

</style>
